package com.xiangyang.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public class Prescription extends BaseEntity {
    private Long prescriptionId;//处方id
    private String DrugName;//药品名称
    private Integer DrugNumber;//药品数量
    private String DrugType; //药品类型
    private String frequency;//用药频率
    private String courseOfTreatment;//疗程
    private String createdAt;//创建时间
    // 重写 BaseEntity 的 getId 和 setId 方法
    @Override
    public Long getId() {
        return getPrescriptionId();
    }

    @Override
    public void setId(Long prescriptionId) {
        setPrescriptionId(prescriptionId);
    }



    public void setPostId(Long prescriptionId) {
        this.prescriptionId = prescriptionId;
        // 同步设置 BaseEntity 的 id
        super.setId(prescriptionId);
    }
}
